public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.CreateTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
        int num = binaryTree.size(root);
        System.out.println();
        System.out.println("节点的个数为：");
        System.out.println(num);
        System.out.println("叶子节点的个数：");
        System.out.println(binaryTree.getLeafNodeCount(root));
        //或者可以写成
//        binaryTree.getLeafNodeCount(root);
//        System.out.println(BinaryTree.leaf);//因为将leaf定义成了BinaryTree的静态成员变量
    }
}
